<?php
/**
 * Created by PhpStorm.
 * User: sunshubo
 * Date: 2017/12/17
 * Time: 20:47
 */

class UploadImages_model extends MY_Model
{
    function memory_images($name)
    {
        $table = 'ws_asset_images';
        $data = array('path' => DOWNLOAND . $name, 'name' => $name);
        $query = $this->my_insert($table, $data);
        if ($query) {
            return $query;
        } else {
            $where = array('name' => $name);
            $query = $this->my_select($table, $where, 'id');
            return $query;
        }
    }
}